home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 15 / Amiga Plus Leser CD 15.iso / Tools / Development / BlitzGTFix / BBGTLib_Examples / gtchangecycle.bb2 < prev    next >
Encoding:
Text File  |  2002-03-13  |  1.1 KB  |  52 lines

  1. WBStartup
  2. WbToScreen 3
  3. Use Screen 3
  4.  
  5. LoadFont 2,"garnet.font",9
  6. Use IntuiFont 2
  7.  
  8.  
  9. ; DONT USE COMMANDS WHICH USE A3 AS A PARAMETER DIRECTLY WITH HEX$
  10. ; COS IT GOES SCREWY
  11.  
  12.  
  13. foo.l=GTCycle(0,1,70,20,150,15,"Cycle-me-do!",#PLACETEXT_RIGHT,"foo|bar|snafu")
  14. NPrint Hex$(foo)
  15.  
  16. GTButton 0,2,20,40,250,15,"Change cycle options",#PLACETEXT_IN
  17.  
  18. AddIDCMP #CYCLEIDCMP|#BUTTONIDCMP
  19.  
  20. Window 0,0,0,400,300,$100f,"jjlk",-1,-1
  21. DefaultOutput
  22. CatchDosErrs
  23.  
  24. Dim option$(2)
  25. option$(0)="this|is the|first|changed|set of|options|and it's|quite|long|as you|can see"
  26. option$(1)="final one|a bit shorter|you like?"
  27.  
  28. optset.w=0
  29.  
  30. ; Test of the GTChangeCycle command when not attached to a window
  31. GTChangeCycle 0,1,"eat|my|shorts"
  32.  
  33. AttachGTList 0,0
  34. While ev.l<>#IDCMP_CLOSEWINDOW
  35.     ev.l=WaitEvent
  36.     Select ev
  37.         Case #IDCMP_GADGETUP
  38.             If GadgetHit=2
  39.                 If optset<2
  40.                     GTChangeCycle 0,1,option$(optset)
  41.                     optset = optset+1
  42.                 Else
  43.                     dummy.l=RTEZRequest("GTChangeCycle example","No more option strings to demo","OK")
  44.                 EndIf
  45.             EndIf
  46.     End Select
  47. Wend
  48. DetachGTList 0
  49. End
  50.  
  51.  
  52.